package com.gis.visualization.controller;

import com.gis.visualization.config.result.R;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/vue-admin-template/user")
//@CrossOrigin
public class LoginController {

    //login
    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }
    //    info
    @GetMapping("info")
    public R info(){
    //roles:对应一个非空数组，所有加 []
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://i.loli.net/2021/01/28/1ipASdPOsUjXEv6.jpg");
    }
}
